<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="navUri" content="<s:url action="list" namespace="/admin/courier" />">
<title><s:if test="%{addOperation}">新增</s:if>
	<s:else>编辑</s:else>快递员</title>
</head>
<body>

<script type="text/javascript">
    var form = null;
    var formValidator = null;
    
    $(document).ready(function(){
    	$("#title").focus();
    	
        form = $("#frm");
        formValidator = form.validate({
            rules: {
                "courier.name": {
                    required: true,
                    rangelength: [2, 200]
                }
            },
           messages: { 
        	    "courier.name": {
                    required: "请输入名称", 
                    rangelength: jQuery.format("名称长度介于 {0} 和 {1} 之间的字符串")
               }
            }
        });
        
        $("#frm :reset").click(function() {
            formValidator.resetForm();
        });
        
    });
    </script>       

    <div class="col-md-12">
      <!-- BEGIN EXAMPLE TABLE PORTLET-->
      <div class="portlet">
         <div class="portlet-title">
            <div class="caption"><i class="icon-edit"></i><s:if test="%{addOperation}">新增</s:if><s:else>编辑</s:else>快递员</div>
         </div>
         
         <s:form id="frm" action="save" namespace="/admin/courier" method="post"  enctype="multipart/form-data" cssClass="form-horizontal">
	         <div class="portlet-body">
             	<div class="input-group">
                	<label class="col-md-3 control-label">名称：</label>
                    <s:textfield name="courier.name" cssClass="form-control" cssStyle="width: 400px" maxlength="100" />
                </div>
	         </div>
         
                <s:include value="/WEB-INF/jsp/admin/form-button-bar.jsp"></s:include>
         </s:form>
      </div>
      <!-- END EXAMPLE TABLE PORTLET-->
   </div>
</body>
</html>